import "package:flutter/material.dart";
// listTitle 包含左中右三个部分
// leading 左侧
// title 中间
// trailing 右侧

class UListTitle extends StatelessWidget {
  final Widget? leading;
  final Widget? content;
  final Widget? trailing;
  final CrossAxisAlignment crossAxisAlignment;
  const UListTitle({
    super.key,
    this.leading,
    this.content,
    this.trailing,
    this.crossAxisAlignment = CrossAxisAlignment.center,
  });
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        crossAxisAlignment: crossAxisAlignment,
        children: [
          leading ?? const SizedBox.shrink(),
          content ?? const SizedBox.shrink(),
          trailing ?? const SizedBox.shrink()
        ],
      ),
    );
  }
}
